<template>
  <div>
    <div  >
      <div  >
        <header  class="mint-header is-fixed">
        <div   class="backBtn" @click="$router.back(-1)">
          <i  class="icon iconfont icon-back"></i>
        </div>
        <h1 class="mint-header-title">我的账单</h1>
        <div class="mint-header-button is-right">
        </div>
        </header>
      </div>
      <div   class="mainWrap initPaddintTop grayBg" v-if="datalist && datalist.length>0">
        <div   class="content" v-for="(item,index) in datalist" :key="index">
          <div class="pinzheng" style="color:#000;font-weight:bold;">支付凭证</div>
          <div style="text-align:center">支付金额</div>
          <div style="text-align:center;color:red;font-weight:bold;margin-top:10px;">￥{{item.order.totalPrice}}</div>
          <div class="danhao">
            <div>单号</div>
            <div>{{item.order.orderNo}}</div>
          </div>
          <!-- <div class="danhao">
            <div>会员</div>
            <div>{{item.order.userId}}</div>
          </div> -->
          <div class="danhao">
            <div>支付项目</div>
            <div>{{item.trader.name}}</div>
          </div>
          <div class="danhao">
            <div>消费场所</div>
            <div>{{item.trader.provinceName}}{{item.trader.cityName}}{{item.trader.townName}}</div>
          </div>
          <div class="danhao">
            <div>微信支付</div>
            <div>￥{{item.order.totalPrice}}</div>
          </div>
          <div class="danhao">
            <div>支付时间</div>
            <div>{{item.order.createTime}}</div>
          </div>
          
        </div>
        
      </div>
      <!-- <div  class="fixed-btm">
        乐慧城市已累计为您节省
        <strong >0.00</strong>元
      </div> -->
    </div>
  </div>
</template>

<script>
import { ConsumeListUrl } from "@/api/axiosFun";
export default {
  name: "Index",
  data() {
    return {
	    datalist: [],
	    page:1,
	    pageSize:100,
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      ConsumeListUrl({
        page:this.page,
        pageSize:this.pageSize
        }).then(res => {
          console.log(res);
          if (res.errCode == 0) {
            this.datalist = res.data;
          }
        });
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.danhao{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.danhao div:nth-of-type(1){
  color: #cccccc;
}
.mint-header {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background-color: #26a2ff;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    font-size: 14px;
    height: 40px;
    line-height: 1;
    padding: 0 10px;
    position: relative;
    text-align: center;
    white-space: nowrap;
}
.mint-header.is-fixed {
    top: 0;
    right: 0;
    left: 0;
    position: fixed;
    z-index: 1;
}
.mint-header {
    height: 1.32rem;
    font-size: .44rem;
    background: -webkit-gradient(linear,left top,right top,from(#0af),to(#0085ff));
    background: linear-gradient(90deg,#0af,#0085ff);
    color: #fff;
}
.mint-header-button {
    -webkit-box-flex: .5;
    -ms-flex: .5;
    flex: .5;
}
.mint-header-button.is-left {
    text-align: left;
}
.mint-header .mint-button {
    background-color: transparent;
    border: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
    color: inherit;
    display: inline-block;
    padding: 0;
    font-size: inherit;
}
.header-icon {
    color: #fff;
}
.mint-button-icon {
    vertical-align: middle;
    display: inline-block;
}
.mintui {
    font-family: mintui!important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: .2px;
    -moz-osx-font-smoothing: grayscale;
}
.mint-header-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
    font-weight: 400;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}
.mint-header-button {
    -webkit-box-flex: .5;
    -ms-flex: .5;
    flex: .5;
}
.mint-header-button.is-right {
    text-align: right;
}
.mainWrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mainWrap.grayBg {
    background-color: #f5f5f5;
}
.content {
    padding: .44rem .44rem 1.42rem;
    font-size: .36rem;
    color: #333;
    margin-top: 46px;
}
.fixed-btm {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.42rem;
    line-height: 1.42rem;
    text-align: center;
    font-size: .4rem;
    letter-spacing: 1px;
    background-color: #fff;
    -webkit-box-shadow: 0 0 10px rgba(0,0,0,.2);
    box-shadow: 0 0 10px rgba(0,0,0,.2);
    font-weight: 700;
}
.fixed-btm strong {
    color: red;
    font-weight: 700;
}
.initPaddintTop{
  margin-top: 46px;
}
.content{
  background: #fff;
  margin: 10px;
}
</style>
